\documentclass{article}
\begin{document}

\begin{test}
  \begin{equation}
    f(x) = 1
  \end{equation}
\end{test}

\begin{subequations}
  \begin{equation}
    f(x) = 1
  \end{equation}
  \begin{equation}
    f(x) = 2
  \end{equation}
\end{subequations}

\begin{equation}
  f(x) = 2
\end{equation}

\end{document}
